package com.adnaan.restaurant.service.impl;

import com.adnaan.restaurant.entity.ResAddress;
import com.adnaan.restaurant.mapper.ResAddressMapper;
import com.adnaan.restaurant.service.IResAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: adnaan
 * create: 2023-12-10 12:32
 * Description:
 */
@Service
public class ResAddressServiceImpl implements IResAddressService {

    @Autowired
    private ResAddressMapper resAddressMapper;

    @Override
    public int insertAddress(ResAddress resAddress) {
        return resAddressMapper.insertAddress(resAddress);
    }

    @Override
    public int deleteAddress(Long id) {
        return resAddressMapper.deleteAddress(id);
    }

    @Override
    public int updateAddress(ResAddress resAddress) {
        return resAddressMapper.updateAddress(resAddress);
    }

    @Override
    public List<ResAddress> selectAddressListByuserId(Long userId) {
        return resAddressMapper.selectAddressListByuserId(userId);
    }
}
